-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Update logic on CheckpointState around serialization/deserialization #5808
[Bug] Update logic on CheckpointState around serialization/deserialization #5808
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Suraj Singh <surajrider@gmail.com>
ae681e9
to
199543d
Compare
|
@dreamer-89 Can we PR this first to main? |
|
This is waiting a merge on #5806 |
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## 2.x #5808 +/- ##
============================================
- Coverage 70.61% 70.45% -0.17%
- Complexity 58695 58824 +129
============================================
Files 4741 4764 +23
Lines 280699 282163 +1464
Branches 40908 41106 +198
============================================
+ Hits 198222 198797 +575
- Misses 66027 66782 +755
- Partials 16450 16584 +134
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Suraj Singh <surajrider@gmail.com> Signed-off-by: Suraj Singh <surajrider@gmail.com> (cherry picked from commit ef3a58f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Suraj Singh <surajrider@gmail.com> Signed-off-by: Suraj Singh <surajrider@gmail.com> (cherry picked from commit ef3a58f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: Suraj Singh <surajrider@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Thanks @dreamer-89 for fixing it up. While development, I had initially put this as 2.5 version, but the same tests were failing earlier due to current being 3.0 at that time. Should it be that - first we get in with Current so that the PR build succeeds and then change it to the specific version? |
Thank you @ashking94 for checking in. I think specifying specific version is better. |
Signed-off-by: Suraj Singh <surajrider@gmail.com> Signed-off-by: Suraj Singh <surajrider@gmail.com>
Description
As part of #5282, we introduced a boolean flag in CheckpointState inside ReplicationTracker with incorrect serialization/deserialization logic.
The bwc tests (using on CheckpointState for transport communication e.g. RecoveryHandoffPrimaryContextRequest) fails on
2.x
because ofin.getVersion().onOrAfter(Version.CURRENT) (2.5.0) < Version.Current (2.6.0)
; resulting in else block execution thereby skipping read on boolean. BUT, the write to outputstream is unconditional which means the minor version (2.5.0 containing #5282 change) writes to output stream.The correct fix here is:
Issues Resolved
#5801
#5766
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.